from seasun.model import get_connection
from seasun.model.user_config import User_config

# 获取数据库连接
_db = get_connection()

def find_weather() -> User_config:
    '''
        从mysql中查询出所有已启用天气或者笑话配置的通知记录
    :return:
    '''
    all = _db.query(User_config).filter((User_config.wstatus == 1) | (User_config.xstatus == 1))
    return all



